# CMakeLists.txt
# Copyright (C) orcaer@yeah.net. All rights reserved.
# Last modified: 2019-9-3

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(uv_cpp)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/
		    ${PROJECT_SOURCE_DIR}/libuv1.30.0/include)

AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/uv  SOURCES)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/uv/http  SOURCES)

LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/libuv1.30.0/lib/gcc8.3.0)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11   -O2")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11  -O2")


MESSAGE("building...")

ADD_LIBRARY (${PROJECT_NAME} STATIC ${SOURCES} )
TARGET_LINK_LIBRARIES(${PROJECT_NAME} "libuv.a" -pthread)
